<?php

/**
 * VstPublicacionesPersonal form base class.
 *
 * @method VstPublicacionesPersonal getObject() Returns the current form's model object
 *
 * @package    reducars
 * @subpackage form
 * @author     victor
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseVstPublicacionesPersonalForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'               => new sfWidgetFormInputHidden(),
      'nombre'           => new sfWidgetFormInputText(),
      'id_publicacion'   => new sfWidgetFormInputText(),
      'descripcion'      => new sfWidgetFormTextarea(),
      'titulo'           => new sfWidgetFormInputText(),
      'link'             => new sfWidgetFormTextarea(),
      'clase'            => new sfWidgetFormInputText(),
      'tipo'             => new sfWidgetFormInputText(),
      'fecha'            => new sfWidgetFormInputText(),
      'id_personal'      => new sfWidgetFormInputText(),
      'clas_descripcion' => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id'               => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'nombre'           => new sfValidatorString(array('max_length' => 81, 'required' => false)),
      'id_publicacion'   => new sfValidatorInteger(array('required' => false)),
      'descripcion'      => new sfValidatorString(array('max_length' => 300, 'required' => false)),
      'titulo'           => new sfValidatorString(array('max_length' => 100)),
      'link'             => new sfValidatorString(array('max_length' => 500, 'required' => false)),
      'clase'            => new sfValidatorInteger(),
      'tipo'             => new sfValidatorInteger(array('required' => false)),
      'fecha'            => new sfValidatorString(array('max_length' => 10, 'required' => false)),
      'id_personal'      => new sfValidatorInteger(array('required' => false)),
      'clas_descripcion' => new sfValidatorString(array('max_length' => 10, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('vst_publicaciones_personal[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'VstPublicacionesPersonal';
  }

}
